
// import {print} from 'nc-lightapp-front';
import print from '../../../../../hrpub/common/utils/print';
import language from '../../language';

export default function() {

    const {
        editTable,
        meta
    } = this.props;

    let template = meta.getMeta();

    let allTableList = editTable.getAllRows('ncc60071701list');

    let oids = [];
    allTableList.map((item) => {
        oids.push(item.values['pk_psnjob'].value);
    })

    // print('pdf', '/nccloud/hrhi/psndoc/PsndocTemplatePrintAction.do', {
    //     funcode: '60071020',
    //     nodekey: '60071020list',
    //     oids: oids
    // });

    print(document.getElementById('mainTable'), {
        title: language['hi6007-000281'], // 员工信息维护
        maker: language['hi6007-000245'],
        date: language['hi6007-000246'],
        beforeAppend: (data) => {
            data[1].forEach((item) => {
                item.splice(item.length - 1, 1);
            });
            return data;
        }
    }, {
        data: allTableList,
        tableTmp: template['ncc60071701list']
    });
}